package com.zll.order.handler;

import com.zll.dubboapi.exception.MyException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Description:
 * @Author: zll
 * @Date: 2021/3/24 22:45
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(MyException.class)
    public String myExceptionHandler(MyException e) {
        return e.getMessage();
    }
}
